<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>

        var a=10 
        var b=20 
        var c=30
        if(a>b)
        {
            console.log(a);
        }else{
            console.log(b);
        }
        a>b?console.log("a大"):console.log("b大"); //15.三目运算符.html

        var max=a>b ? (a>c? a:c) : (b>c? b:c)
        console.log('方法一'+max);

        var max1=(a>b&&a>c)? a:(b>c? b:c)
        console.log('方法二'+max1);

    </script>
</head>
<body>

    
</body>
</html>